Skip to content

feat: Added throttle utility functions#60

Merged
klmhyeonwoo merged 3 commits intomainfrom
feature/util-workspace
Oct 22, 2025
Merged

feat: Added throttle utility functions#60
klmhyeonwoo merged 3 commits intomainfrom
feature/util-workspace

Conversation

@klmhyeonwoo
Copy link
Copy Markdown
Member

closes: #19

@klmhyeonwoo klmhyeonwoo self-assigned this Oct 21, 2025
Copilot AI review requested due to automatic review settings October 21, 2025 08:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a throttle utility function to the commonUtil package. The throttle function limits how often a function can be called by ensuring it executes at most once per specified time interval.

Key Changes:

  • Implemented a new throttle utility function with a default 300ms limit
  • Added comprehensive test coverage for throttle behavior
  • Exported the throttle function from the commonUtil index

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
package/commonUtil/throttle/index.ts Implements the core throttle function with configurable time limit
package/commonUtil/throttle/index.test.ts Adds test cases verifying throttle timing behavior
package/commonUtil/index.ts Exports the throttle function from the commonUtil package
README.md Documents the throttle function usage and API signature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread package/commonUtil/throttle/index.ts Outdated
@klmhyeonwoo
Copy link
Copy Markdown
Member Author

klmhyeonwoo commented Oct 21, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.68% 306 / 384
🔵 Statements 79.68% 306 / 384
🔵 Functions 96.66% 29 / 30
🔵 Branches 89.14% 115 / 129
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
package/commonUtil/throttle/index.ts 100% 100% 100% 100%
Generated in workflow #92 for commit ba7e8f2 by the Vitest Coverage Report Action

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@prgmr99 prgmr99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~~~🙌

@klmhyeonwoo klmhyeonwoo merged commit 3ac6d34 into main Oct 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

commonUtil > throttle()

3 participants